
import React, { useEffect, useState } from 'react'
import Congaojiss from '../Cogaojiss/Congaojiss'
import Conbiaoge from '../Conbiaoge/Conbiaoge'
import '../../../assets/css/tongxunlu/Conchangecad.css'
import getdataMobox from '../Mobox/tongxunldata'
import { observer } from 'mobx-react';




export default function Conchangecad() {
    useEffect(
        () => {},
        []
    )
    const [tabData, setTabData] = useState([]);
    // 根据点击的选项卡传值给后端获取当前的列表的数据
    const qinqiuall = (e) => {
        // 获取date-key值
        // console.log(e.currentTarget.getAttribute("date-key"));

        // console.log(e);
         getdataMobox.updatedlist3(e) 
    }
    const lizhilist = (e) => {
        // 获取date-key值
        // console.log(e.currentTarget.getAttribute("date-key"));
         getdataMobox.updatedlist3(e) 
        
    }
    return (
        <div>
            <div className='ywbox'>
                <button date-key="通讯录列表" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>通讯录列表
                </button>
                <button date-key="总经办" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>总经办
                </button>
                <button date-key="财务部" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>财务部
                </button>
                <button date-key="业务一部" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>业务一部
                </button>
                <button date-key="业务二部" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>业务二部
                </button>
                <button date-key="渠道招商部" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>渠道招商部
                </button>
                <button date-key="营销部" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>营销部
                </button>
                <button date-key="采购部" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>采购部
                </button>
                <button date-key="客服部" onClick={(e) => {
                    qinqiuall(e.currentTarget.getAttribute("date-key"))
                }}>客服部
                </button>

                <button className='departurelist' date-key="已离职" onClick={(e) => {
                    lizhilist(e.currentTarget.getAttribute("date-key"))
                }}>已离职列表
                </button>
            </div>
            <div className='ass'>
                <Congaojiss></Congaojiss>
            </div>

            <Conbiaoge setTabData={setTabData} ></Conbiaoge>

        </div>
    );
}




